package thread.sunwq;

public class Machine extends Thread {
	private int a = 0;

	public void run() {
		for (a = 0; a < 50; a++) {
			System.out.println(Thread.currentThread().getName() + ":" + a);
			try {
				sleep(100);
			} catch (InterruptedException e) {
				throw new RuntimeException(e);
			}
		}
	}

	public static void main(String[] args) {
		// System.out.println(Thread.currentThread().getName());
		Machine mac01 = new Machine();
		Machine mac02 = new Machine();
		mac01.start();
		mac02.start();
		// mac01.run();
	}
}
